/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "SessionManagementSubscriptionData.h"

namespace oai::udr::model {

SessionManagementSubscriptionData::SessionManagementSubscriptionData() {
  m_DnnConfigurationsIsSet = false;
  m_InternalGroupIdsIsSet = false;
  m_SharedVnGroupDataIdsIsSet = false;
  m_SharedDnnConfigurationsId = "";
  m_SharedDnnConfigurationsIdIsSet = false;
  m_OdbPacketServicesIsSet = false;
  m_TraceDataIsSet = false;
  m_SharedTraceDataId = "";
  m_SharedTraceDataIdIsSet = false;
  m_ExpectedUeBehavioursListIsSet = false;
  m_SuggestedPacketNumDlListIsSet = false;
  m_r_3gppChargingCharacteristics = "";
  m_r_3gppChargingCharacteristicsIsSet = false;
}

SessionManagementSubscriptionData::~SessionManagementSubscriptionData() {}

void SessionManagementSubscriptionData::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const SessionManagementSubscriptionData &o) {
  j = nlohmann::json();
  j["singleNssai"] = o.m_SingleNssai;
  if (o.dnnConfigurationsIsSet() || !o.m_DnnConfigurations.empty())
    j["dnnConfigurations"] = o.m_DnnConfigurations;
  if (o.internalGroupIdsIsSet() || !o.m_InternalGroupIds.empty())
    j["internalGroupIds"] = o.m_InternalGroupIds;
  if (o.sharedVnGroupDataIdsIsSet() || !o.m_SharedVnGroupDataIds.empty())
    j["sharedVnGroupDataIds"] = o.m_SharedVnGroupDataIds;
  if (o.sharedDnnConfigurationsIdIsSet())
    j["sharedDnnConfigurationsId"] = o.m_SharedDnnConfigurationsId;
  if (o.odbPacketServicesIsSet())
    j["odbPacketServices"] = o.m_OdbPacketServices;
  if (o.traceDataIsSet())
    j["traceData"] = o.m_TraceData;
  if (o.sharedTraceDataIdIsSet())
    j["sharedTraceDataId"] = o.m_SharedTraceDataId;
  if (o.expectedUeBehavioursListIsSet() ||
      !o.m_ExpectedUeBehavioursList.empty())
    j["expectedUeBehavioursList"] = o.m_ExpectedUeBehavioursList;
  if (o.suggestedPacketNumDlListIsSet() ||
      !o.m_SuggestedPacketNumDlList.empty())
    j["suggestedPacketNumDlList"] = o.m_SuggestedPacketNumDlList;
  if (o.r3gppChargingCharacteristicsIsSet())
    j["3gppChargingCharacteristics"] = o.m_r_3gppChargingCharacteristics;
}

void from_json(const nlohmann::json &j, SessionManagementSubscriptionData &o) {
  j.at("singleNssai").get_to(o.m_SingleNssai);
  if (j.find("dnnConfigurations") != j.end()) {
    j.at("dnnConfigurations").get_to(o.m_DnnConfigurations);
    o.m_DnnConfigurationsIsSet = true;
  }
  if (j.find("internalGroupIds") != j.end()) {
    j.at("internalGroupIds").get_to(o.m_InternalGroupIds);
    o.m_InternalGroupIdsIsSet = true;
  }
  if (j.find("sharedVnGroupDataIds") != j.end()) {
    j.at("sharedVnGroupDataIds").get_to(o.m_SharedVnGroupDataIds);
    o.m_SharedVnGroupDataIdsIsSet = true;
  }
  if (j.find("sharedDnnConfigurationsId") != j.end()) {
    j.at("sharedDnnConfigurationsId").get_to(o.m_SharedDnnConfigurationsId);
    o.m_SharedDnnConfigurationsIdIsSet = true;
  }
  if (j.find("odbPacketServices") != j.end()) {
    j.at("odbPacketServices").get_to(o.m_OdbPacketServices);
    o.m_OdbPacketServicesIsSet = true;
  }
  if (j.find("traceData") != j.end()) {
    j.at("traceData").get_to(o.m_TraceData);
    o.m_TraceDataIsSet = true;
  }
  if (j.find("sharedTraceDataId") != j.end()) {
    j.at("sharedTraceDataId").get_to(o.m_SharedTraceDataId);
    o.m_SharedTraceDataIdIsSet = true;
  }
  if (j.find("expectedUeBehavioursList") != j.end()) {
    j.at("expectedUeBehavioursList").get_to(o.m_ExpectedUeBehavioursList);
    o.m_ExpectedUeBehavioursListIsSet = true;
  }
  if (j.find("suggestedPacketNumDlList") != j.end()) {
    j.at("suggestedPacketNumDlList").get_to(o.m_SuggestedPacketNumDlList);
    o.m_SuggestedPacketNumDlListIsSet = true;
  }
  if (j.find("3gppChargingCharacteristics") != j.end()) {
    j.at("3gppChargingCharacteristics")
        .get_to(o.m_r_3gppChargingCharacteristics);
    o.m_r_3gppChargingCharacteristicsIsSet = true;
  }
}

Snssai SessionManagementSubscriptionData::getSingleNssai() const {
  return m_SingleNssai;
}
void SessionManagementSubscriptionData::setSingleNssai(Snssai const &value) {
  m_SingleNssai = value;
}
std::map<std::string, DnnConfiguration> &
SessionManagementSubscriptionData::getDnnConfigurations() {
  return m_DnnConfigurations;
}
void SessionManagementSubscriptionData::setDnnConfigurations(
    std::map<std::string, DnnConfiguration> const &value) {
  m_DnnConfigurations = value;
  m_DnnConfigurationsIsSet = true;
}
bool SessionManagementSubscriptionData::dnnConfigurationsIsSet() const {
  return m_DnnConfigurationsIsSet;
}
void SessionManagementSubscriptionData::unsetDnnConfigurations() {
  m_DnnConfigurationsIsSet = false;
}
std::vector<std::string> &
SessionManagementSubscriptionData::getInternalGroupIds() {
  return m_InternalGroupIds;
}
void SessionManagementSubscriptionData::setInternalGroupIds(
    std::vector<std::string> const &value) {
  m_InternalGroupIds = value;
  m_InternalGroupIdsIsSet = true;
}
bool SessionManagementSubscriptionData::internalGroupIdsIsSet() const {
  return m_InternalGroupIdsIsSet;
}
void SessionManagementSubscriptionData::unsetInternalGroupIds() {
  m_InternalGroupIdsIsSet = false;
}
std::map<std::string, std::string> &
SessionManagementSubscriptionData::getSharedVnGroupDataIds() {
  return m_SharedVnGroupDataIds;
}
void SessionManagementSubscriptionData::setSharedVnGroupDataIds(
    std::map<std::string, std::string> const &value) {
  m_SharedVnGroupDataIds = value;
  m_SharedVnGroupDataIdsIsSet = true;
}
bool SessionManagementSubscriptionData::sharedVnGroupDataIdsIsSet() const {
  return m_SharedVnGroupDataIdsIsSet;
}
void SessionManagementSubscriptionData::unsetSharedVnGroupDataIds() {
  m_SharedVnGroupDataIdsIsSet = false;
}
std::string
SessionManagementSubscriptionData::getSharedDnnConfigurationsId() const {
  return m_SharedDnnConfigurationsId;
}
void SessionManagementSubscriptionData::setSharedDnnConfigurationsId(
    std::string const &value) {
  m_SharedDnnConfigurationsId = value;
  m_SharedDnnConfigurationsIdIsSet = true;
}
bool SessionManagementSubscriptionData::sharedDnnConfigurationsIdIsSet() const {
  return m_SharedDnnConfigurationsIdIsSet;
}
void SessionManagementSubscriptionData::unsetSharedDnnConfigurationsId() {
  m_SharedDnnConfigurationsIdIsSet = false;
}
OdbPacketServices
SessionManagementSubscriptionData::getOdbPacketServices() const {
  return m_OdbPacketServices;
}
void SessionManagementSubscriptionData::setOdbPacketServices(
    OdbPacketServices const &value) {
  m_OdbPacketServices = value;
  m_OdbPacketServicesIsSet = true;
}
bool SessionManagementSubscriptionData::odbPacketServicesIsSet() const {
  return m_OdbPacketServicesIsSet;
}
void SessionManagementSubscriptionData::unsetOdbPacketServices() {
  m_OdbPacketServicesIsSet = false;
}
TraceData SessionManagementSubscriptionData::getTraceData() const {
  return m_TraceData;
}
void SessionManagementSubscriptionData::setTraceData(TraceData const &value) {
  m_TraceData = value;
  m_TraceDataIsSet = true;
}
bool SessionManagementSubscriptionData::traceDataIsSet() const {
  return m_TraceDataIsSet;
}
void SessionManagementSubscriptionData::unsetTraceData() {
  m_TraceDataIsSet = false;
}
std::string SessionManagementSubscriptionData::getSharedTraceDataId() const {
  return m_SharedTraceDataId;
}
void SessionManagementSubscriptionData::setSharedTraceDataId(
    std::string const &value) {
  m_SharedTraceDataId = value;
  m_SharedTraceDataIdIsSet = true;
}
bool SessionManagementSubscriptionData::sharedTraceDataIdIsSet() const {
  return m_SharedTraceDataIdIsSet;
}
void SessionManagementSubscriptionData::unsetSharedTraceDataId() {
  m_SharedTraceDataIdIsSet = false;
}
std::map<std::string, ExpectedUeBehaviourData> &
SessionManagementSubscriptionData::getExpectedUeBehavioursList() {
  return m_ExpectedUeBehavioursList;
}
void SessionManagementSubscriptionData::setExpectedUeBehavioursList(
    std::map<std::string, ExpectedUeBehaviourData> const &value) {
  m_ExpectedUeBehavioursList = value;
  m_ExpectedUeBehavioursListIsSet = true;
}
bool SessionManagementSubscriptionData::expectedUeBehavioursListIsSet() const {
  return m_ExpectedUeBehavioursListIsSet;
}
void SessionManagementSubscriptionData::unsetExpectedUeBehavioursList() {
  m_ExpectedUeBehavioursListIsSet = false;
}
std::map<std::string, SuggestedPacketNumDl> &
SessionManagementSubscriptionData::getSuggestedPacketNumDlList() {
  return m_SuggestedPacketNumDlList;
}
void SessionManagementSubscriptionData::setSuggestedPacketNumDlList(
    std::map<std::string, SuggestedPacketNumDl> const &value) {
  m_SuggestedPacketNumDlList = value;
  m_SuggestedPacketNumDlListIsSet = true;
}
bool SessionManagementSubscriptionData::suggestedPacketNumDlListIsSet() const {
  return m_SuggestedPacketNumDlListIsSet;
}
void SessionManagementSubscriptionData::unsetSuggestedPacketNumDlList() {
  m_SuggestedPacketNumDlListIsSet = false;
}
std::string
SessionManagementSubscriptionData::getR3gppChargingCharacteristics() const {
  return m_r_3gppChargingCharacteristics;
}
void SessionManagementSubscriptionData::setR3gppChargingCharacteristics(
    std::string const &value) {
  m_r_3gppChargingCharacteristics = value;
  m_r_3gppChargingCharacteristicsIsSet = true;
}
bool SessionManagementSubscriptionData::r3gppChargingCharacteristicsIsSet()
    const {
  return m_r_3gppChargingCharacteristicsIsSet;
}
void SessionManagementSubscriptionData::unsetr_3gppChargingCharacteristics() {
  m_r_3gppChargingCharacteristicsIsSet = false;
}

} // namespace oai::udr::model
